package com.yan.demo;

public class Demo5 {
    public static void main(String[] args) {
        String str1 = Integer.toBinaryString(59);
        System.out.println("str1 = " + str1);
        String str2 = Integer.toOctalString(59);
        System.out.println("str2 = " + str2);
        String str3 = Integer.toHexString(59);
        System.out.println("str3 = " + str3);
        // 其他转10进制
        int num1 = Integer.parseInt("29c" , 16);
        System.out.println("num1 = " + num1);
        System.out.println(Integer.parseInt("10", 8));
        System.out.println(Integer.parseInt("1001", 2));

    }
}
